import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/index',
    name: 'Index',
    component: () => import('../pages/index.vue')
  },
  {
    path: '/part2',
    name: 'Part2',
    component: () => import('../pages/Part2.vue')
  },
  {
    path: '/manufacture',
    name: "Manufacture",
    component: () => import('../pages/manufacture.vue')
  },
  {
    path: '/contactus',
    name: 'Contactus',
    component: () => import('../pages/contact.vue')
  },
  {
    path: '/homepage',
    name: 'homepage',
    component: () => import('../pages/Homepage.vue')
  },
  {
    path: '/newsInformation',
    name: 'NewsInformation',
    component: () => import('../pages/NewsInformation.vue')
  },
  {
    path: '/productDisplay',
    name: 'ProductDisplay',
    component: () => import('../pages/ProductDisplay.vue')
  },
  {
    path: '/details/:id',
    name: 'details',
    component: () => import('../pages/details.vue')
    
  },
  // 重定向
  {
    path: "",
    component: () => import('../pages/index.vue')
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
